package com.qianniu.napi.admin.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 用户粉丝表
 * </p>
 *
 * @author chenxuebin
 * @since 2018-07-07
 */
@TableName("t_order_stat")
public class OrderStat extends Model<OrderStat> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Integer total;
    private BigDecimal money;

    private String statday;

    private Integer stattype;
    @TableField(exist = false)
    private boolean unfold = true;

    @JsonIgnore
    private Long sid;
    @JsonIgnore
    private Long mid;
    @JsonIgnore
    private Long mpid;
    @JsonIgnore
    private Date createtime;
    @TableField(exist = false)
    private List<Order> olist;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public String getStatday() {
        return statday;
    }

    public void setStatday(String statday) {
        this.statday = statday;
    }

    public Integer getStattype() {
        return stattype;
    }

    public void setStattype(Integer stattype) {
        this.stattype = stattype;
    }

    public Long getSid() {
        return sid;
    }

    public void setSid(Long sid) {
        this.sid = sid;
    }

    public Long getMid() {
        return mid;
    }

    public void setMid(Long mid) {
        this.mid = mid;
    }

    public Long getMpid() {
        return mpid;
    }

    public void setMpid(Long mpid) {
        this.mpid = mpid;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public List<Order> getOlist() {
        return olist;
    }

    public void setOlist(List<Order> olist) {
        this.olist = olist;
    }

    public boolean isUnfold() {
        return unfold;
    }

    public void setUnfold(boolean unfold) {
        this.unfold = unfold;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "OrderStat{" +
                "id=" + id +
                ", total=" + total +
                ", money=" + money +
                ", statday='" + statday + '\'' +
                ", stattype=" + stattype +
                ", sid=" + sid +
                ", mid=" + mid +
                ", mpid=" + mpid +
                ", createtime=" + createtime +
                '}';
    }
}
